package me.zk.practice1.thread;

/**
 * @author zhangkai
 * @date 2023/7/31 16:00
 */
public class PrintABCDemo {
    public static void main(String[] args) {
        Thread t1 = new Thread(()->System.out.println("a"));
        Thread t2 = new Thread(()->{
            try {
                t1.join();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println("b");
           });
        Thread t3 = new Thread(()->{
            try {
                t2.join();
                System.out.println("c");
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
          });

        t3.start();
        t1.start();
        t2.start();
    }

}
